-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CLI] Add support for vesting contract #4786
Conversation
crates/aptos/src/stake/mod.rs
Outdated
UnlockVestingRewards(UnlockVestingRewards), | ||
UnlockVestedCoins(UnlockVestedCoins), | ||
VestingDistribute(VestingDistribute), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three things don't mean much to me, and as a user I wouldn't be able to tell between the three.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any better suggestions for naming then?
crates/aptos/src/stake/mod.rs
Outdated
|
||
#[derive(Parser)] | ||
pub struct UnlockVestingRewards { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these commands should have a doc comment explaining what it does
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
crates/aptos/src/stake/mod.rs
Outdated
prompt_yes_with_override( | ||
&format!( | ||
"Unlock vested coins for vesting contract {}. Confirm?", | ||
vesting_contract_address | ||
), | ||
self.txn_options.prompt_options, | ||
)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might get rid of these, because it asks you again when you simulate the transaction for confirmation. But, it's fine for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted them
crates/aptos/src/stake/mod.rs
Outdated
#[derive(Parser)] | ||
pub struct VestingDistribute { | ||
/// Address of the vesting contract's admin. | ||
/// | ||
/// Defaults to the profile's address if not set. | ||
#[clap(long, parse(try_from_str=crate::common::types::load_account_arg))] | ||
pub admin_address: AccountAddress, | ||
|
||
#[clap(flatten)] | ||
pub(crate) txn_options: TransactionOptions, | ||
} | ||
|
||
#[async_trait] | ||
impl CliCommand<TransactionSummary> for VestingDistribute { | ||
fn command_name(&self) -> &'static str { | ||
"VestingDistribute" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep all the commands as verb
-item
DistributeVestingRewards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
56b5335
to
079965b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
This change is